package cn.shengchao.examstar.distribute.infrastrure.mapper;

import cn.shengchao.examstar.distribute.infrastrure.po.DistributeContentProductThird;
import cn.shengchao.examstar.rpc.distribute.req.ThirdProductDistributeUserQueryPage;
import cn.shengchao.examstar.rpc.distribute.resp.ThirdProductDistributeForUserRespEntity;
import cn.shengchao.examstar.rpc.distribute.resp.ThirdProductDistributeProxyInfoRespEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface DistributeContentProductThirdMapper extends BaseMapper<DistributeContentProductThird> {
    List<ThirdProductDistributeForUserRespEntity> selectListByPageQuery(@Param("pageQuery") ThirdProductDistributeUserQueryPage thirdProductDistributeUserQueryPage);
    //按产品ID查询内容代理的信息
    List<ThirdProductDistributeProxyInfoRespEntity> selectListByProductId(@Param("productId") Long productId);


    BigDecimal sumPercentUseExcludeUserId(Long productId, Long userId);
}